<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: RadioStateAnalogueModel Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00182.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">RadioStateAnalogueModel Class Reference<div class="ingroups"><a class="el" href="a00510.html">phyLayer - physical layer modules</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="RadioStateAnalogueModel" --><!-- doxytag: inherits="AnalogueModel" -->
<p>This special <a class="el" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a> provides filtering of a <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> according to the actual RadioStates the Radio were in during the Signal's time interval.  
 <a href="a00182.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00303_source.html">PhyUtils.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for RadioStateAnalogueModel:</div>
<div class="dyncontent">
<div class="center"><img src="a00964.png" border="0" usemap="#RadioStateAnalogueModel_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for RadioStateAnalogueModel:</div>
<div class="dyncontent">
<div class="center"><img src="a00965.png" border="0" usemap="#RadioStateAnalogueModel_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00966.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00125.html">ListEntry</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Data structure for the list elements.  <a href="a00125.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a40d4abacbe1feb2cf2bbc4902f0f24e5"></a><!-- doxytag: member="RadioStateAnalogueModel::time_attenuation_collection_type" ref="a40d4abacbe1feb2cf2bbc4902f0f24e5" args="" -->
typedef std::list&lt; <a class="el" href="a00125.html">ListEntry</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a40d4abacbe1feb2cf2bbc4902f0f24e5">time_attenuation_collection_type</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The type to hold the attenuation's over time. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a722dae61250442ba49917eceff0bdb74">RadioStateAnalogueModel</a> (Argument::mapped_type_cref initValue, bool <a class="el" href="a00182.html#a576c1bc7398c256153ac9e22bbc84f61">currentlyTracking</a>=false, simtime_t_cref initTime=SIMTIME_ZERO)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Standard constructor for a <a class="el" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a> instance.  <a href="#a722dae61250442ba49917eceff0bdb74"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#ad1d87d5b9447579b3d28dcdcc4d0dd32">filterSignal</a> (airframe_ptr_t, const <a class="el" href="a00065.html">Coord</a> &amp;, const <a class="el" href="a00065.html">Coord</a> &amp;)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Filters the AirFrame's <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> according to the RadioState (passively), i.e. adding an appropriate instance of <a class="el" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a> to the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a>.  <a href="#ad1d87d5b9447579b3d28dcdcc4d0dd32"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a3457871c28e3e86759f70a9def9f28"></a><!-- doxytag: member="RadioStateAnalogueModel::setTrackingModeTo" ref="a9a3457871c28e3e86759f70a9def9f28" args="(bool b)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a9a3457871c28e3e86759f70a9def9f28">setTrackingModeTo</a> (bool b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">sets tracking mode <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a8034e0bc85edc2debfcacacafc86cefb">cleanUpUntil</a> (simtime_t_cref t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Cleans up all stored information strictly before the given time-point, i.e. all elements with their time-point strictly smaller than given key. That means multiple entries with same time are preserved.  <a href="#a8034e0bc85edc2debfcacacafc86cefb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#ad80154bcc09f8db0e08efb2efd75872c">writeRecvEntry</a> (simtime_t_cref time, Argument::mapped_type_cref value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores an entry of the form "time-point/attenuation (from now on)".  <a href="#ad80154bcc09f8db0e08efb2efd75872c"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85a93fd7827eb98707f472d31e5c6fd4"></a><!-- doxytag: member="RadioStateAnalogueModel::radioStateAttenuation" ref="a85a93fd7827eb98707f472d31e5c6fd4" args="" -->
<a class="el" href="a00182.html#a40d4abacbe1feb2cf2bbc4902f0f24e5">time_attenuation_collection_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4">radioStateAttenuation</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Data structure to track the Radios attenuation over time. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a576c1bc7398c256153ac9e22bbc84f61"></a><!-- doxytag: member="RadioStateAnalogueModel::currentlyTracking" ref="a576c1bc7398c256153ac9e22bbc84f61" args="" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a576c1bc7398c256153ac9e22bbc84f61">currentlyTracking</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicator variable whether we are currently tracking changes. <br/></td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ec9262901fa86ea2ef6d08fc9410144"></a><!-- doxytag: member="RadioStateAnalogueModel::RSAMMapping" ref="a6ec9262901fa86ea2ef6d08fc9410144" args="" -->
class&#160;</td><td class="memItemRight" valign="bottom"><b>RSAMMapping</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab901736afc45f0b8dbe019c39356aa09"></a><!-- doxytag: member="RadioStateAnalogueModel::RSAMConstMappingIterator" ref="ab901736afc45f0b8dbe019c39356aa09" args="" -->
class&#160;</td><td class="memItemRight" valign="bottom"><b>RSAMConstMappingIterator</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This special <a class="el" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a> provides filtering of a <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> according to the actual RadioStates the Radio were in during the Signal's time interval. </p>
<p>This <a class="el" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a> models the effects of the radio state on the received signal. This effects are for example total attenuation during the time the radio is not in receiving state. And no attenuation at all if it is in receiving state.</p>
<p>This way it is assured that the received power calculated for a <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> by use of the AnalogueModels really is the power received, means if the radio is not in receiving state then this is reflected by the received power of the signal. Therefore the <a class="el" href="a00070.html" title="The basic Decider class.">Decider</a> which evaluates the receiving power doesn't have to care about if the radio was in correct state to actually receive a signal. It just has to check if the receiving power was/is high enough.</p>
<p>A state-machine-diagram for Radio, <a class="el" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a> and <a class="el" href="a00043.html" title="This class is used by the BasePhyLayer to keep track of the AirFrames on the channel.">ChannelInfo</a> showing how they work together under control of <a class="el" href="a00029.html" title="The BasePhyLayer represents the physical layer of a nic.">BasePhyLayer</a> as well as some documentation on how <a class="el" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a> works is available in <a class="el" href="a00510.html">phyLayer - physical layer modules</a>. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a722dae61250442ba49917eceff0bdb74"></a><!-- doxytag: member="RadioStateAnalogueModel::RadioStateAnalogueModel" ref="a722dae61250442ba49917eceff0bdb74" args="(Argument::mapped_type_cref initValue, bool currentlyTracking=false, simtime_t_cref initTime=SIMTIME_ZERO)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RadioStateAnalogueModel::RadioStateAnalogueModel </td>
          <td>(</td>
          <td class="paramtype">Argument::mapped_type_cref&#160;</td>
          <td class="paramname"><em>initValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>currentlyTracking</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">simtime_t_cref&#160;</td>
          <td class="paramname"><em>initTime</em> = <code>SIMTIME_ZERO</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Standard constructor for a <a class="el" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a> instance. </p>
<p>Default setting is: tracking off </p>
<div class="fragment"><pre class="fragment">    : <a class="code" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a>()
    , <a class="code" href="a00182.html#a576c1bc7398c256153ac9e22bbc84f61" title="Indicator variable whether we are currently tracking changes.">currentlyTracking</a>(<a class="code" href="a00182.html#a576c1bc7398c256153ac9e22bbc84f61" title="Indicator variable whether we are currently tracking changes.">currentlyTracking</a>)
    , <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>()
  {
    <span class="comment">// put the initial time-stamp to the list</span>
    <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.push_back(ListEntry(initTime, initValue));
  }
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a8034e0bc85edc2debfcacacafc86cefb"></a><!-- doxytag: member="RadioStateAnalogueModel::cleanUpUntil" ref="a8034e0bc85edc2debfcacacafc86cefb" args="(simtime_t_cref t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RadioStateAnalogueModel::cleanUpUntil </td>
          <td>(</td>
          <td class="paramtype">simtime_t_cref&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Cleans up all stored information strictly before the given time-point, i.e. all elements with their time-point strictly smaller than given key. That means multiple entries with same time are preserved. </p>
<p>Intended to be used by the <a class="el" href="a00173.html" title="Provides initialisation for several AnalogueModels and Deciders from modules directory.">PhyLayer</a></p>
<p>THIS SHOULD BE THE ONLY WAY TO DELETE ENTRIES IN THE RECEIVING LIST </p>
<div class="fragment"><pre class="fragment">{
  <span class="comment">// assert that list is not empty</span>
  assert(!<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.empty());

  <span class="comment">/* the list contains at least one element */</span>

  <span class="comment">// CASE: t is smaller or equal the timepoint of the first element ==&gt; nothing to do, return</span>
  <span class="keywordflow">if</span> ( t &lt;= <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.front().getTime() )
  {
    <span class="keywordflow">return</span>;
  }

  <span class="comment">// CASE: t is greater than the timepoint of the last element</span>
  <span class="comment">// ==&gt; clear complete list except the last element, return</span>
  <span class="keywordflow">if</span> ( t &gt; <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.back().getTime() )
  {
    <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.erase(<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.begin(), --<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.end());
    <span class="keywordflow">return</span>;
  }

  <span class="comment">/*</span>
<span class="comment">   * preconditions from now on:</span>
<span class="comment">   * 1. list contains at least two elements, since 2. + 3.</span>
<span class="comment">   * 2. t &gt; first_timepoint</span>
<span class="comment">   * 3. t &lt;= last_timepoint</span>
<span class="comment">   */</span>

  <span class="comment">// get an iterator and set it to the first timepoint &gt;= t</span>
  time_attenuation_collection_type::iterator it =
          lower_bound(<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.begin(), <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.end(), t);

  <span class="comment">// CASE: list contains an element with exactly the given key</span>
  <span class="keywordflow">if</span> ( it != <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.end() &amp;&amp; !(t &lt; *it) )
  {
    <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.erase(<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.begin(), it);
    <span class="keywordflow">return</span>;
  }

  <span class="comment">// CASE: t is &quot;in between two elements&quot;</span>
  <span class="comment">// ==&gt; set the iterators predecessors time to t, it becomes the first element</span>
  --it; <span class="comment">// go back one element, possible since this one has not been the first one</span>

  it-&gt;setTime(t); <span class="comment">// set this elements time to t</span>
  <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.erase(<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.begin(), it); <span class="comment">// and erase all previous elements</span>
}
</pre></div>
</div>
</div>
<a class="anchor" id="ad1d87d5b9447579b3d28dcdcc4d0dd32"></a><!-- doxytag: member="RadioStateAnalogueModel::filterSignal" ref="ad1d87d5b9447579b3d28dcdcc4d0dd32" args="(airframe_ptr_t, const Coord &amp;, const Coord &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RadioStateAnalogueModel::filterSignal </td>
          <td>(</td>
          <td class="paramtype">airframe_ptr_t&#160;</td>
          <td class="paramname"><em>frame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00065.html">Coord</a> &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00065.html">Coord</a> &amp;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Filters the AirFrame's <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> according to the RadioState (passively), i.e. adding an appropriate instance of <a class="el" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a> to the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a>. </p>
<p>The <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> is added a new <a class="el" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a> that has a pointer to this instance <a class="el" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a>, hence the pointer is valid as long as the Radio instance exists that has this RSAM as a member. </p>

<p>Implements <a class="el" href="a00009.html#a3242bc36a68dab53551d4ab1f1dab010">AnalogueModel</a>.</p>

<p>References <a class="el" href="a00192.html#a0beeef0f27c33145a0fca521df1c5f5c">Signal::addAttenuation()</a>, <a class="el" href="a00192.html#a2875223239e124d85949e1116cc12ae9">Signal::getReceptionEnd()</a>, and <a class="el" href="a00192.html#a7c4710243cf87caf7dfc9f313e2619b2">Signal::getReceptionStart()</a>.</p>
<div class="fragment"><pre class="fragment">{
  <a class="code" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a>&amp;      signal     = frame-&gt;getSignal();
  <a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>* attMapping = <span class="keyword">new</span> <a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>(<span class="keyword">this</span>, signal.<a class="code" href="a00192.html#a7c4710243cf87caf7dfc9f313e2619b2" title="Returns the point in time when the receiving of the Signal started at the receiver module...">getReceptionStart</a>(), signal.<a class="code" href="a00192.html#a2875223239e124d85949e1116cc12ae9" title="Returns the point in time when the receiving of the Signal ended at the receiver module. Already includes the propagation delay.">getReceptionEnd</a>());

  signal.<a class="code" href="a00192.html#a0beeef0f27c33145a0fca521df1c5f5c" title="Adds a function representing an attenuation of the signal.">addAttenuation</a>(attMapping);
}
</pre></div>
</div>
</div>
<a class="anchor" id="ad80154bcc09f8db0e08efb2efd75872c"></a><!-- doxytag: member="RadioStateAnalogueModel::writeRecvEntry" ref="ad80154bcc09f8db0e08efb2efd75872c" args="(simtime_t_cref time, Argument::mapped_type_cref value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RadioStateAnalogueModel::writeRecvEntry </td>
          <td>(</td>
          <td class="paramtype">simtime_t_cref&#160;</td>
          <td class="paramname"><em>time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Argument::mapped_type_cref&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Stores an entry of the form "time-point/attenuation (from now on)". </p>
<p>Intended to be used by the Radio </p>
<div class="fragment"><pre class="fragment">{
  <span class="comment">// bugfixed on 08.04.2008</span>
  assert( (<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.empty()) || (time &gt;= <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.back().getTime()) );

  <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.push_back(ListEntry(time, value));

  <span class="keywordflow">if</span> (!<a class="code" href="a00182.html#a576c1bc7398c256153ac9e22bbc84f61" title="Indicator variable whether we are currently tracking changes.">currentlyTracking</a>)
  {
    <a class="code" href="a00182.html#a8034e0bc85edc2debfcacacafc86cefb" title="Cleans up all stored information strictly before the given time-point, i.e. all elements with their t...">cleanUpUntil</a>(time);

    assert(<a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>.back().getTime() == time);
  }
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/<a class="el" href="a00303_source.html">PhyUtils.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/PhyUtils.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00182.html">RadioStateAnalogueModel</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:33 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
